﻿import Vue from 'vue'
import in_page from "./in_page_action/in_page" //入库

const _this_ac = {
  goback(context,obj){
    obj.router.go(-1);
  },
  redirect(context, payload) {
    router.push({'name': payload.name})
  },
  thom_redirect(state, obj) {
      console.log("1111111111111111111")
       console.log(obj)
    obj.router.push({path: obj.name})
  },
  //in get mess~~
  thom_index_get_mess(context){
    Vue.prototype.$ajax.get('/easy_stock/purchase/secondary_category/list')
      .then((res)=> {
        console.log(res.data.data);
        //改变 in 页面的 bottom-btn
        context.commit('Change_bottom_btn',res.data.data)
        //loading ani change
        setTimeout(()=>{
          context.commit("Change_loading_show")
        },600)
      }).catch((e)=>{
      //出错什么的 ffff
      console.log(e)
      alert("获取失败")
    });
  },
  get_bottom_btn(){
    console.log("yes")
  },
  redirect_thom(){
    const router = new VueRouter({
      routes: [
        { path: '/a', component: A, alias: '/b' }
      ]
    })
  },
  get_in_list(){

  },
  login(state,obj){
    console.log("username")
    console.log(obj.username)
    console.log("pwd_+_+_+_+_+")
    console.log(obj.pwd)
  }
}
Object.assign(_this_ac,in_page)

// _this_ac.concat(in_page);

export default _this_ac

